<div class="header">
  <div class="nav-header">
    <div class="logo">
      <a (click)="setTracingPoint()" [routerLink]="'/home'" title="首页">
        <img src="../assets/img/logo.svg" style="width: 210px; height: 40px" />
      </a>
    </div>
    <div class="nav-right" [ngStyle]="{ width: navType === 1 ? '82.5%' : '85.5%' }">
      <div class="search" *ngIf="navType === 1">
      </div>
      <div class="breadcrumb" *ngIf="navType === 2">
        <div></div>
        <span>{{ navTitle }}</span>
      </div>
      <div class="menu">
        <div>
          <div *ngFor="let item of navList" class="menu-item" (click)="gotoPage(item.link)">
            <img [title]="item.name" [src]="item.img" style="width: 40px; height: 40px; transform: scale(0.5)"
              alt="管理" />
          </div>
          <div class="userInfo">
            <ng-container *ngIf="
                this.cookieService.get('token');
                else elseTemplateUserName
              ">
              <section>
                <div class="avatar">
                  <img class="default-avatar" [src]="imgsrc" style="width: 40px; height: 40px; border-radius: 50%"
                    alt="" />
                  <div>
                    <ul>
                      <li (click)="goBaseInfo()">个人中心</li>
                      <li (click)="gotoPage('/collections')">我的收藏</li>
                      <li (click)="gotoPage('/orderManage')">订单中心</li>
                      <li (click)="logOut()" style="border-top: 1px solid rgba(74, 75, 82, 0.2)">
                        退出登录
                      </li>
                    </ul>
                  </div>
                </div>
              </section>
            </ng-container>
            <ng-template #elseTemplateUserName>
              <div class="default-avatar-unlogin" (click)="gotoPage('/login/logins')">登录</div>
            </ng-template>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
